﻿Imports System.Data.OleDb
Public Class añadirProducto_AdminFrm

    Private Sub PRODUCTOBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PRODUCTOBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.PRODUCTOBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.ScrumDataSet)

    End Sub

   

    Private Sub añadirProducto_Admin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      
        'TODO: esta línea de código carga datos en la tabla 'ScrumDataSet.PRODUCTO' Puede moverla o quitarla según sea necesario.
        'Me.PRODUCTOTableAdapter.Fill(Me.ScrumDataSet.PRODUCTO)


    End Sub

    Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click

    End Sub

    Private Sub btnAñadir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAñadir.Click
     
        Dim prod As New Producto(NombreTextBox.Text, PrecioTextBox.Text, DescripcionTextBox.Text)
        admin.AñadirProducto(prod)
    End Sub

    Private Sub PRODUCTOBindingNavigator_RefreshItems(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PRODUCTOBindingNavigator.RefreshItems

    End Sub
End Class